<template>
    <div>
        <title-bar :title="titleText | titleTest"/>
        <div class="warapper">
          <div class="button">
            <text class="text" @click="showToast">Toast</text>
          </div>
        </div>
    </div>
</template>
<script>
import TitleBar from "../components/TitleBar";
var test = weex.requireModule("test");
export default {
  components: {
    TitleBar
  },
  data: {
    titleText: "Module"
  },
  methods: {
    showToast: function() {
      test.showToast("原生Toast");
    }
  },
  filters: {
    titleTest: function(value) {
      if (!value) return "";
      value = value.toString();
      return value + "拓展";
    }
  }
};
</script>
<style>
.warapper {
  justify-content: center;
  align-items: center;
}
.button {
  width: 350px;
  border-radius: 10px;
  background-color: #3eaf7c;
}
.text {
  font-size: 40px;
  padding: 10px;
  color: #fff;
  text-align: center;
}
</style>


